package com.bcxk.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bcxk.entity.dto.MinsuImg;
import com.bcxk.mapper.MinSuImgMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class MinSuImgService extends ServiceImpl<MinSuImgMapper, MinsuImg> {

    @Transactional(readOnly = true)
    public List<MinsuImg> getMinSuImgsByMinSuId(Long minsuId) {
        QueryWrapper<MinsuImg> wrapper = new QueryWrapper<>();
        wrapper.lambda().eq(MinsuImg::getMinsuId,minsuId);
        return this.list(wrapper);
    }
}
